gir: Add (nullable) to ostree_blob_reader_read_blob return value
authorAlexander Larsson <alexl@redhat.com>
Fri, 26 Sep 2025 11:24:41 +0000 (13:24 +0200)
committerAlexander Larsson <alexl@redhat.com>
Fri, 26 Sep 2025 13:37:06 +0000 (15:37 +0200)
This adds api docs to ostree_blob_reader_read_blob() so that we
can mark the return value as nullable. This is needed, because
this function can return NULL without setting error, and this
needs to be handled in bindings (such as the rust ones).

src/libostree/ostree-blob-reader.c

index 4f1314b84465f11011ec5a09612b750e7e92ba51..7d80b1d3c87ea4c553eb03b213f846acb8bf060d 100644 (file)
@@ -29,6 +29,19 @@ ostree_blob_reader_default_init (OstreeBlobReaderInterface *iface)
   g_debug ("OstreeBlobReader initialization");
 }
 
+/**
+ * ostree_blob_reader_read_blob
+ * @self: A OstreeBlobReader
+ * @cancellable: a #GCancellable
+ * @error: a #GError
+ *
+ * Read one blob from the reader, or %NULL if there are no more.
+ * On error, @error is set and %NULL is returned.
+ *
+ * Returns: (nullable): A #GBytes blob, or %NULL if there are no more
+ *
+ * Since: 2016.5
+ */
 GBytes *
 ostree_blob_reader_read_blob (OstreeBlobReader *self, GCancellable *cancellable, GError **error)
 {